//
//  SubmitSuccessfullyVC.m
//  MRBang
//
//  Created by 铅笔 on 16/4/19.
//  Copyright © 2016年 杭州易网新科技. All rights reserved.
//

#import "SubmitSuccessfullyVC.h"
#import "ChooseCreditableCardVC.h"//选择银行卡

@interface SubmitSuccessfullyVC ()

@end

@implementation SubmitSuccessfullyVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"帮你办";
    
    self.navigationItem.leftBarButtonItem = nil;

    [self initWithSubmitSuccessfullyVCSubviews];
    
    [self initWithRightButtonSubviews];
    
}

#pragma mark --- right button
- (void) initWithRightButtonSubviews
{
    
    UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"return_left"] style:UIBarButtonItemStyleDone target:self action:@selector(backToHomeViewAction)];
    menuButton.tintColor = [UIColor whiteColor];
    self.navigationItem.leftBarButtonItem = menuButton;
    
}

//返回到首页
- (void) backToHomeViewAction
{
        for (UIViewController *temp in self.navigationController.viewControllers) {
    
            if ([temp isKindOfClass:[ChooseCreditableCardVC class]]) {
                [self.navigationController popToViewController:temp animated:YES];
            }
        }
}


- (void) backUptoPreductionView
{

    //    for (UIViewController *temp in self.navigationController.viewControllers) {
    //
    //        if ([temp isKindOfClass:[HomeViewController class]]) {
    //            [self.navigationController popToViewController:temp animated:YES];
    //        }
    //    }

}

#pragma mark --- 创建所有视图
- (void) initWithSubmitSuccessfullyVCSubviews
{
    //展位的背景图
    UIImageView *imageView_fullImage = [[UIImageView alloc] initWithFrame:CGRectMake(145*PROPORTION_WIDTH,(234+173)*PROPORTION_WIDTH, kScreenWidth-145*PROPORTION_WIDTH*2, 126*PROPORTION_WIDTH)];
    [self.view addSubview:imageView_fullImage];
    imageView_fullImage.image = [UIImage imageNamed:@"text"];
    
    // button
    UIButton *button_checkProgressCard = [[UIButton alloc] initWithFrame:CGRectMake(48*PROPORTION_WIDTH,kScreenHeight-93*PROPORTION_WIDTH-10,kScreenWidth - 48*PROPORTION_WIDTH*2, 93*PROPORTION_WIDTH)];
    [self.view addSubview:button_checkProgressCard];
    
    [button_checkProgressCard  setBackgroundImage:[UIImage imageNamed:@"button_lookProgress"] forState:UIControlStateNormal];
    
    [button_checkProgressCard addTarget:self action:@selector(doCheckProgressCardAction) forControlEvents:UIControlEventTouchUpInside];
}

//查看办卡进度执行事件
- (void) doCheckProgressCardAction
{


}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}


@end
